<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><s:property value="dataList.getTitle()"/></title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
	<h1 style="margin-left: 15px"><s:property value="dataList.getTitle()"/></h1>
	<hr style="box-shadow: 0px 0px 5px deepskyblue" />
	<style type="text/css">
body {
	padding: 20px;
}

.table {
	width: 100%;
}

span.glyphicon {
	font-size: 20px;
	text-align: center;
}

.glyphicon {
	height: 100%;
	display: block;
}
</style>
	<ul class="nav nav-pills" role="tablist">
		<s:if test="!dataList.cancelAdd">
			<li role="presentation"><a href="Javascript:void(0)"
				onclick="add()"><span class="glyphicon glyphicon-floppy-open"></span>添加</a>
			</li>
		</s:if>
	</ul>
	<hr style="box-shadow: 0px 0px 1px deepskyblue" />
	<table class="table table-striped table-hover" valign="center">
		<thead>
			<tr>
				<th>ID</th>
				<!--S 自定义编辑区-->
				<s:iterator value="dataList.getThList()" var="a">
					<th><s:property value="#a"/></th>
				</s:iterator>
				<!--E 自定义编辑区-->
				<s:if test="!dataList.cancelEdit">
					<th>编辑</th>
				</s:if>
				<s:if test="!dataList.cancelDelete">
					<th>删除</th>
				</s:if>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="dataList.getTrItemList()" var="a">
				<tr>
					<s:iterator value="dataList.getThNameList()" var="b" status="c">
						<s:if test="#c.First">
							<td id="id"><s:property value="#a.get(#b)"/></td>
						</s:if>
						<s:else>
							<td><s:property value="#a.get(#b)"/></td>
						</s:else>
						
					</s:iterator>
					<s:if test="!dataList.cancelEdit">
						<td>
							<a href="Javascript:void(0)" class="glyphicon glyphicon-edit" onclick="editThis(this)"></a>
						</td>
					</s:if>
					<s:if test="!dataList.cancelDelete">
						<td>
							<a href="Javascript:void(0)" class="glyphicon glyphicon-remove" onclick="removeThis(this)"></a>
						</td>
					</s:if>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<script type="text/javascript">
		//config
		var dataListId = '<s:property value="dataListId" />';
		var base_url = window.location.href;
		base_url = base_url.replace(".action", "");
		base_url = base_url.replace("control_","cM_");
	</script>
	<script type="text/javascript" src="js/back_contral_btn.js"></script>

</body>
</html>